{% include "base/template_head.html" %}
<link rel="stylesheet" href="/static/css/paging.css">
<!-- <link rel="stylesheet" href="/static/css/bootstrap-duallistbox.css">
<link rel="stylesheet" href="/static/css/bootstrap-multiselect.css">
<link rel="stylesheet" href="/static/css/select2.css"> -->

<script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/js/query.js"></script>
<script type="text/javascript" src="/static/js/paging.js"></script>
<!-- <script type="text/javascript" src="/static/js/ace-extra.js"></script> -->

<!-- <link rel="stylesheet" href="/static/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />
<link rel="stylesheet" href="/static/css/chosen.css" />
<script type="text/javascript" src="/static/js/chosen.jquery.js"></script>
<script type="text/javascript" src="/static/js/ace/ace.js"></script>
<script type="text/javascript" src="/static/js/ace/ace.searchbox-autocomplete.js"></script> -->



<!-- 左右多选css -->
<link rel="stylesheet" href="/static/css/bootstrap-duallistbox.css" />
<link rel="stylesheet" href="/static/css/bootstrap-multiselect.css" />
<link rel="stylesheet" href="/static/css/select2.css" />
<!-- 左右多选css -->

<!-- 面板折叠css-->
<link rel="stylesheet" href="/static/css/jquery-ui.css" />
<!-- 面板折叠css -->

<!-- 左右多选js -->
<script type="text/javascript" src="/static/js/jquery.bootstrap-duallistbox.js"></script>
<script type="text/javascript" src="/static/js/jquery.raty.js"></script>
<script type="text/javascript" src="/static/js/bootstrap-multiselect.js"></script>
<script type="text/javascript" src="/static/js/select2.js"></script>
<script type="text/javascript" src="/static/js/typeahead.jquery.js"></script>
<!-- 左右多选js -->


<!-- 面板折叠js -->
<script type="text/javascript" src="/static/js/jquery-ui.js"></script>
<script type="text/javascript" src="/static/js/jquery.ui.touch-punch.js"></script>
<!-- 面板折叠js -->

<style type="text/css">
    h1,h2,h3,h4,h5,h6,p {
        font-family: Microsoft YaHei;
    }
</style>

<div class="row">
    <div class="col-lg-12">
        <div class="row">
            <div class="col-lg-12">
            	<!-- <div class="page-header">
					<h1>邮件通知管理</h1>
				</div> -->
	            <!-- <h2 class="header"><b>邮件通知管理</b></h2> -->
	            <ul class="list-unstyled spaced">
	            	<div class="tabbable">
						<ul class="nav nav-tabs" id="myTab">
							<li class="active">
								<a data-toggle="tab" href="#mailserver" onclick="GetLoginList(1,10)">
									<i class="blue ace-icon fa fa-envelope-open bigger-120"></i>
									邮件服务器详情
								</a>
							</li>
							<li >
								<a data-toggle="tab" href="#mypublist" onclick="GetLoginList(1,10)">
									<i class="blue ace-icon fa fa-cog bigger-120"></i>
									邮件通知配置
								</a>
							</li>
							<li >
								<a data-toggle="tab" href="#forreview" onclick="GetActionList(1,10)">
									<i class="orange ace-icon fa fa-envelope-o bigger-120"></i>
									邮件通知列表
								</a>			
							</li>
						</ul>

						<div class="tab-content">
							<div id="mailserver" class="tab-pane fade in active">
								<div class="page-header">
									<!-- <h2> -->
										邮箱基本信息
										<small>
											<i class="ace-icon fa fa-angle-double-right"></i>
											Common form elements and layouts
										</small>
									<!-- </h2> -->
								</div>

<!-- 								<div class="row">
									<div class="col-lg-1">选择邮箱</div>
	                                <div class="col-lg-11">
		                                <select data-placeholder="请选择需要提交的审核人" class="chosen-select">
			                                <option selected >请选择</option>
			                                <option>1</option>
			                                <option>1</option>
			                                <option>1</option>
			                                <option>1</option>
			                                <option>1</option>
		                                </select>

	                                </div>

	                            </div> -->

								<div class="row">
									<div class="col-xs-12">
										<!-- PAGE CONTENT BEGINS -->
										<form class="form-horizontal" role="form">
											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 邮箱SMTP服务器 </label>

												<div class="col-sm-9">
													<input type="text" id="form-field-1" placeholder="例如：smtp.126.com" class="col-xs-10 col-sm-5" />
												</div>
											</div>

											<div class="space-4"></div>

											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 邮箱用户名 </label>

												<div class="col-sm-9">
													<input type="text" id="form-field-1" placeholder="例如：myemail@126.com" class="col-xs-10 col-sm-5" />
												</div>
											</div>

											<div class="space-4"></div>

											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 邮箱密码(授权码)</label>

												<div class="col-sm-8">
													<input type="password" id="form-field-2" placeholder="Password" class="col-xs-10 col-sm-5" />
													<p class="col-xs-5" ><span class="popover-success" data-rel="popover" title="什么是邮箱授权码" data-content="授权码是用于登录第三方邮件客户端的专用密码,通常在邮箱SMTP设置中获取"><i class="ace-icon fa fa-question-circle bigger-110"></i></span></p>
												</div>

											</div>

											<!-- <div class="clearfix form-actions"> -->
											<div class="form-group">
												<div class="col-md-offset-3 col-md-9">
													<button class="btn btn-info btn-mini" type="button">
														<i class="ace-icon fa fa-check bigger-110"></i>
														邮箱验证
													</button>

													&nbsp; &nbsp; &nbsp;
													<button class="btn btn-mini" type="reset">
														<i class="ace-icon fa fa-undo bigger-110"></i>
														重置输入
													</button>
												</div>
											</div>

											<hr>



										</form>

									</div>
								</div>


							</div>


							<div id="mypublist" class="tab-pane fade">
								<div class="col-xs-12 col-sm-12">
									<div class="widget-box transparent">



										<div class="widget-header widget-header-small">
											<h4 class="widget-title smaller">
												<i class="ace-icon fa fa-check-square-o bigger-110"></i>
												基础选择
											</h4>
										</div>

										<div class="space-4"></div>
										
										<div class="widget-body">
											<div class="widget-main">

												<div class="profile-user-info profile-user-info-striped">
													<div class="profile-info-row">
														<div class="profile-info-name"> 选择告警邮箱 </div>

														<div class="profile-info-value">
															<span >
																<!-- <div class="col-sm-3" id='aaaa'>
										                             <select data-placeholder="选择欲发布的压缩文件" class="chosen-select">
								                                        <option selected >abc@126.com</option>
								                                        <option >abc@163.com</option>
								                                        <option >abc@qq.com</option>
								                                        <option >abc@sina.com</option>
								                                        <option >abc@gmail.com</option>
								                                    </select>
							                                	</div> -->
							                                	<div class="col-sm-5">
										                             <select>
								                                        <option selected >---请选择邮箱---</option>
								                                        <option >abc@126.com</option>
								                                        <option >abc@163.com</option>
								                                        <option >abc@qq.com</option>
								                                        <option >abc@sina.com</option>
								                                        <option >abc@gmail.com</option>
								                                    </select>
							                                	</div>
							                                </span>
														</div>
													</div>
												</div>

											</div>
										</div>
									</div>
								</div>
								


								<div class="col-xs-12 col-sm-12">
									<div class="widget-box transparent">
										<div class="widget-header widget-header-small">
											<h4 class="widget-title smaller">
												<i class="ace-icon fa fa-check-square-o bigger-110"></i>
												通知配置
											</h4>
											<span class="btn btn-mini btn-success" style="float: right;" onclick="layer.alert('保存')">保存修改</span>
										</div>

										<div class="widget-body">
											<div class="widget-main">
												<div id="accordion" class="accordion-style2">
													<div class="group">
														<h3 class="accordion-header">发布通知</h3>
														<div>
															<dl id="dt-list-1">
																<div class="row">
																	<div class="col-xs-12">
																		<!-- PAGE CONTENT BEGINS -->
																		<form class="form-horizontal" role="form">
																			<!-- <div class="clearfix form-actions"> -->

																			<div class="form-group">
																				<label class="control-label col-xs-12 col-sm-3">是否启用通知</label>
																				<div class="col-xs-3">
																					<label>
																						<input name="switch-field-1" class="ace ace-switch ace-switch-5" type="checkbox" />
																						<span class="lbl"></span>
																					</label>
																				</div>
																			</div>

																			<div class="form-group">
											                                	<label class="control-label col-xs-12 col-sm-3">通知间隔</label>

												                                <div class="col-sm-5">

												                                    <select class="form-control">
												                                        <option >每2分钟</option>
												                                        <option selected >每5分钟</option>
												                                        <option >每10分钟</option>
												                                        <option >每15分钟</option>
												                                        <option >每30分钟</option>
												                                        <option >每60分钟</option>
												                                    </select>

												                                </div>
												                            </div>
																			<div class="form-group">
											                                	<label class="control-label col-xs-12 col-sm-3">通知次数</label>

												                                <div class="col-sm-5" id='aaaa'>

												                                    <select class="form-control">
												                                        <option >只通知1次</option>
												                                        <option selected >只通知5次</option>
												                                        <option >只通知10次</option>
												                                        <option >每次都通知</option>
												                                    </select>

												                                </div>
												                            </div>

												                            <div class="form-group " >
																				<label class="col-sm-3  col-xs-12 control-label" for="duallist"> 通知邮箱 </label>

																				<div class="col-sm-5">

																					<select multiple="multiple" size="10" name="duallistbox_demo1[]" id="duallist">
																						<option value="option1">test001@hk515.com</option>
																						<option value="option2">test002@hk515.com</option>
																						<option value="option3" selected="selected">test003@hk515.com</option>
																						<option value="option4">test004@hk515.com</option>
																						<option value="option5">test005@hk515.com</option>
																						<option value="option6" selected="selected">test006@hk515.com</option>
																						<option value="option7">test007@hk515.com</option>
																						<option value="option8">test008@hk515.com</option>
																						<option value="option9">test009@hk515.com</option>
																						<option value="option0">test010@hk515.com</option>
																						<option value="option11" selected="selected">test011@hk515.com</option>
																					</select>


																					<div class="hr hr-16 hr-dotted"></div>
																				</div>
																			</div>


																			
								
																			</form>
																		</div>
																</div>

															</dl>
														</div>
													</div>

													<div class="space-4"></div>
													<div class="group">
														<h3 class="accordion-header">审核通知</h3>

														<div>
															<dl id="dt-list-2">

																<div class="row">
																	<div class="col-xs-12">
																		<!-- PAGE CONTENT BEGINS -->
																		<form class="form-horizontal" role="form">
																			<!-- <div class="clearfix form-actions"> -->
																			<div class="form-group">
																				<label class="control-label col-xs-12 col-sm-3">是否启用通知</label>
																				<div class="col-xs-3">
																					<label>
																						<input name="switch-field-1" class="ace ace-switch ace-switch-5" type="checkbox" />
																						<span class="lbl"></span>
																					</label>
																				</div>
																			</div>
																			<div class="form-group">
											                                	<label class="control-label col-xs-12 col-sm-3">通知间隔</label>

												                                <div class="col-sm-3" id='aaaa'>

												                                    <select class="form-control">
												                                        <option >每2分钟</option>
												                                        <option selected >每5分钟</option>
												                                        <option >每10分钟</option>
												                                        <option >每15分钟</option>
												                                        <option >每30分钟</option>
												                                        <option >每60分钟</option>
												                                    </select>

												                                </div>
												                            </div>
																			<div class="form-group">
											                                	<label class="control-label col-xs-12 col-sm-3">通知次数</label>

												                                <div class="col-sm-3" id='aaaa'>

												                                    <select class="form-control">
												                                        <option >只通知1次</option>
												                                        <option selected >只通知5次</option>
												                                        <option >只通知10次</option>
												                                        <option >每次都通知</option>
												                                    </select>

												                                </div>
												                            </div>
																			<div class="form-group " >
																				<label class="col-sm-3  col-xs-12 control-label" for="duallist"> 通知邮箱 </label>

																				<div class="col-sm-5">

																					<select multiple="multiple" size="10" name="duallistbox_demo1[]" id="duallist">
																						<option value="option1">test001@hk515.com</option>
																						<option value="option2">test002@hk515.com</option>
																						<option value="option3" selected="selected">test003@hk515.com</option>
																						<option value="option4">test004@hk515.com</option>
																						<option value="option5">test005@hk515.com</option>
																						<option value="option6" selected="selected">test006@hk515.com</option>
																						<option value="option7">test007@hk515.com</option>
																						<option value="option8">test008@hk515.com</option>
																						<option value="option9">test009@hk515.com</option>
																						<option value="option0">test010@hk515.com</option>
																						<option value="option11" selected="selected">test011@hk515.com</option>
																					</select>


																					<div class="hr hr-16 hr-dotted"></div>
																				</div>
																			</div>
																		</form>
																		</div>
																</div>

															</dl>
														</div>
													</div>

													<div class="space-4"></div>
													<div class="group">
														<h3 class="accordion-header">测试通知</h3>


														<div>
															<dl id="dt-list-3">

																<div class="row">
																	<div class="col-xs-12">
																		<!-- PAGE CONTENT BEGINS -->
																		<form class="form-horizontal" role="form">
																			<!-- <div class="clearfix form-actions"> -->
																			<div class="form-group">
																				<label class="control-label col-xs-12 col-sm-3">是否启用通知</label>
																				<div class="col-xs-3">
																					<label>
																						<input name="switch-field-1" class="ace ace-switch ace-switch-5" type="checkbox" />
																						<span class="lbl"></span>
																					</label>
																				</div>
																			</div>
																			<div class="form-group">
											                                	<label class="control-label col-xs-12 col-sm-3">通知间隔</label>

												                                <div class="col-sm-3">

												                                    <select class="form-control">
												                                        <option >每2分钟</option>
												                                        <option selected >每5分钟</option>
												                                        <option >每10分钟</option>
												                                        <option >每15分钟</option>
												                                        <option >每30分钟</option>
												                                        <option >每60分钟</option>
												                                    </select>

												                                </div>
												                            </div>
																			<div class="form-group">
											                                	<label class="control-label col-xs-12 col-sm-3">通知次数</label>

												                                <div class="col-sm-3" id='aaaa'>

												                                    <select class="form-control">
												                                        <option >只通知1次</option>
												                                        <option selected >只通知5次</option>
												                                        <option >只通知10次</option>
												                                        <option >每次都通知</option>
												                                    </select>

												                                </div>
												                            </div>
																			<div class="form-group " >
																				<label class="col-sm-3 col-xs-12 control-label" for="duallist"> 通知邮箱 </label>

																				<div class="col-sm-5">

																					<select multiple="multiple" size="10" name="duallistbox_demo1[]" id="duallist">
																						<option value="option1">test001@hk515.com</option>
																						<option value="option2">test002@hk515.com</option>
																						<option value="option3" selected="selected">test003@hk515.com</option>
																						<option value="option4">test004@hk515.com</option>
																						<option value="option5">test005@hk515.com</option>
																						<option value="option6" selected="selected">test006@hk515.com</option>
																						<option value="option7">test007@hk515.com</option>
																						<option value="option8">test008@hk515.com</option>
																						<option value="option9">test009@hk515.com</option>
																						<option value="option0">test010@hk515.com</option>
																						<option value="option11" selected="selected">test011@hk515.com</option>
																					</select>


																					<div class="hr hr-16 hr-dotted"></div>
																				</div>
																			</div>
																		</form>
																		</div>
																</div>

															</dl>
														</div>
													</div>
												</div><!-- #accordion -->
												

											</div>
										</div>
									</div>
								</div>

								<div class="row"></div>

							</div>

							<div id="forreview" class="tab-pane fade">
								<span style="float: left;color: green"><b>&nbsp;总记录数&nbsp;<span id='previewlistcount'></span>&nbsp;条</b></span>
								<div class="nav-search" style="float: right;">
									<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="ace-icon fa fa-search nav-search-icon"></i>
									</span>
								</div>
								<br>
								<hr>
								<div class="widget-body">
			                        <div class="widget-main no-padding">
			                            <table class="table table-bordered table-striped">
			                                <thead class="thin-border-bottom">
			                                    <tr>
			                                        <th><i class="ace-icon fa fa-caret-right blue"></i>操作日志ID</th>
			                                        <th><i class="ace-icon fa fa-caret-right blue"></i>操作人员</th>
			                                        <th><i class="ace-icon fa fa-caret-right blue"></i>操作时间</th>
			                                        <th><i class="ace-icon fa fa-caret-right blue"></i>操作类型</th>
			                                        <th><i class="ace-icon fa fa-caret-right blue"></i>操作模块</th>
			                                        <th><i class="ace-icon fa fa-caret-right blue"></i>操作备注</th>
			                                    </tr>
			                                </thead>

			                                <tbody id= 'previewlist'>
			                                </tbody>
			                            </table>

			                        </div>
			                    </div>
			                    <br>
								<hr>			                    
			                    <div id="pageToolbar"></div>
							</div>

							<!-- <div id="pageToolbar"></div> -->
						</div>

					</div>



				</ul>
            </div>
        </div>
    </div>


</div>
{% include "base/template_footer.html" %}
<script>

	jQuery(function($){

		if(!ace.vars['touch']) {
			$('.chosen-select').chosen({allow_single_deselect:true}); 
			//resize the chosen on window resize
	
			$(window)
			.off('resize.chosen')
			.on('resize.chosen', function() {
				$('.chosen-select').each(function() {
					 var $this = $(this);
					 $this.next().css({'width': $this.parent().width()});
				})
			}).trigger('resize.chosen');
			//resize chosen on sidebar collapse/expand
			$(document).on('settings.ace.chosen', function(e, event_name, event_val) {
				if(event_name != 'sidebar_collapsed') return;
				$('.chosen-select').each(function() {
					 var $this = $(this);
					 $this.next().css({'width': $this.parent().width()});
				})
			});
	
	
			$('#chosen-multiple-style .btn').on('click', function(e){
				var target = $(this).find('input[type=radio]');
				var which = parseInt(target.val());
				if(which == 2) $('#form-field-select-4').addClass('tag-input-style');
				 else $('#form-field-select-4').removeClass('tag-input-style');
			});
		}

		//chosen plugin inside a modal will have a zero width because the select element is originally hidden
		//and its width cannot be determined.
		//so we set the width after modal is show
		$('#modal-form').on('shown.bs.modal', function () {
			if(!ace.vars['touch']) {
				$(this).find('.chosen-container').each(function(){
					$(this).find('a:first-child').css('width' , '210px');
					$(this).find('.chosen-drop').css('width' , '210px');
					$(this).find('.chosen-search input').css('width' , '200px');
				});
			}
		})
		/**
		//or you can activate the chosen plugin after modal is shown
		//this way select element becomes visible with dimensions and chosen works as expected
		$('#modal-form').on('shown', function () {
			$(this).find('.modal-chosen').chosen();
		})
		*/


		//问号提示框
		$('[data-rel=tooltip]').tooltip();
		$('[data-rel=popover]').popover({html:true});


		//启用折叠框
		window.prettyPrint && prettyPrint();
		$('#id-check-horizontal-1').removeAttr('checked').on('click', function(){
			// $('#dt-list-1').toggleClass('dl-horizontal').prev().html(this.checked ? '&lt;dl class="dl-horizontal"&gt;' : '&lt;dl&gt;');
			$('#dt-list-1').toggleClass('hidden')
		});
		$('#id-check-horizontal-2').removeAttr('checked').on('click', function(){
			// $('#dt-list-1').toggleClass('dl-horizontal').prev().html(this.checked ? '&lt;dl class="dl-horizontal"&gt;' : '&lt;dl&gt;');
			$('#dt-list-2').toggleClass('hidden')
		});
		$('#id-check-horizontal-3').removeAttr('checked').on('click', function(){
			// $('#dt-list-1').toggleClass('dl-horizontal').prev().html(this.checked ? '&lt;dl class="dl-horizontal"&gt;' : '&lt;dl&gt;');
			$('#dt-list-3').toggleClass('hidden')
		});


		//面板折叠ui
		$( "#accordion" ).accordion({
			collapsible: true ,
			heightStyle: "content",
			animate: 250,
			header: ".accordion-header"
		}).sortable({
			axis: "y",
			handle: ".accordion-header",
			stop: function( event, ui ) {
				// IE doesn't register the blur when sorting
				// so trigger focusout handlers to remove .ui-state-focus
				ui.item.children( ".accordion-header" ).triggerHandler( "focusout" );
			}
		});

		//左右多选
		var demo1 = $('select[name="duallistbox_demo1[]"]').bootstrapDualListbox({infoTextFiltered: '<span class="label label-purple label-lg">Filtered</span>'});
		var container1 = demo1.bootstrapDualListbox('getContainer');
		container1.find('.btn').addClass('btn-white btn-info btn-bold');

		/**var setRatingColors = function() {
			$(this).find('.star-on-png,.star-half-png').addClass('orange2').removeClass('grey');
			$(this).find('.star-off-png').removeClass('orange2').addClass('grey');
		}*/
		$('.rating').raty({
			'cancel' : true,
			'half': true,
			'starType' : 'i'
			/**,
			
			'click': function() {
				setRatingColors.call(this);
			},
			'mouseover': function() {
				setRatingColors.call(this);
			},
			'mouseout': function() {
				setRatingColors.call(this);
			}*/
		})//.find('i:not(.star-raty)').addClass('grey');
		
		
		
		
		//////////////////
		$('.multiselect').multiselect({
		 enableFiltering: true,
		 buttonClass: 'btn btn-white btn-primary',
		 templates: {
			button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"></button>',
			ul: '<ul class="multiselect-container dropdown-menu"></ul>',
			filter: '<li class="multiselect-item filter"><div class="input-group"><span class="input-group-addon"><i class="fa fa-search"></i></span><input class="form-control multiselect-search" type="text"></div></li>',
			filterClearBtn: '<span class="input-group-btn"><button class="btn btn-default btn-white btn-grey multiselect-clear-filter" type="button"><i class="fa fa-times-circle red2"></i></button></span>',
			li: '<li><a href="javascript:void(0);"><label></label></a></li>',
			divider: '<li class="multiselect-item divider"></li>',
			liGroup: '<li class="multiselect-item group"><label class="multiselect-group"></label></li>'
		 }
		});
		
		
		///////////////////
			
		//typeahead.js
		//example taken from plugin's page at: https://twitter.github.io/typeahead.js/examples/
		var substringMatcher = function(strs) {
			return function findMatches(q, cb) {
				var matches, substringRegex;
			 
				// an array that will be populated with substring matches
				matches = [];
			 
				// regex used to determine if a string contains the substring `q`
				substrRegex = new RegExp(q, 'i');
			 
				// iterate through the pool of strings and for any string that
				// contains the substring `q`, add it to the `matches` array
				$.each(strs, function(i, str) {
					if (substrRegex.test(str)) {
						// the typeahead jQuery plugin expects suggestions to a
						// JavaScript object, refer to typeahead docs for more info
						matches.push({ value: str });
					}
				});

				cb(matches);
			}
		 }

		 $('input.typeahead').typeahead({
			hint: true,
			highlight: true,
			minLength: 1
		 }, {
			name: 'states',
			displayKey: 'value',
			source: substringMatcher(ace.vars['US_STATES'])
		 });
			
			
		///////////////
		
		
		//in ajax mode, remove remaining elements before leaving page
		$(document).one('ajaxloadstart.page', function(e) {
			$('[class*=select2]').remove();
			$('select[name="duallistbox_demo1[]"]').bootstrapDualListbox('destroy');
			$('.rating').raty('destroy');
			$('.multiselect').multiselect('destroy');
		});



	})
 


	function Getstatus(){
		console.log($("#sbutton").val())
	}

	$(document).ready(function(){
		GetLoginList(1,10);
	});

	function GetLoginList(s_page,page_size) {
		//取出单页数据
		function GetLoginListInfo(s_page,page_size){
			$.ajax({
				type:'POST',
				url:'/log/GetLoginList/',
				data:{'s_page':s_page,'page_size':page_size},
				dataType:'json',
				success:function(val){
					console.log(val)
					console.log(val.LogQsetList)
					var detail = val.LogQsetList
					// $("#mypublistcount").html(val.page_total)
					if(detail.length==0){
						$("#publishlist").html('<tr><td colspan="9" style="text-align:center;">当前无记录</td></tr>')
					}else{
						$("#publishlist").html("")
					}
					// $('#mypublistcount').html(detail.length)

					for (var i=0;i < detail.length;i++){
						// $("#per_publish_user").html(val.review_data[i].publish_user)
						// console.log(val.review_data[i].publish_user)
						var publish_id = detail[i]['id']
					
					$("#publishlist").append("<tr>\
							<td id='publish_"+(publish_id)+"_id'></td>\
							<td id='publish_"+(publish_id)+"_Loginuser'></td>\
							<td id='publish_"+(publish_id)+"_Logintime'></td>\
							<td id='publish_"+(publish_id)+"_Logouttime'></td>\
							<td id='publish_"+(publish_id)+"_Logaction'></td></tr>")

					//加载数据

					$("#publish_"+(publish_id)+"_id").html('<span class="badge">'+publish_id+'</span>')
					$("#publish_"+(publish_id)+"_Loginuser").html(detail[i].Loginuser)
					$("#publish_"+(publish_id)+"_Logintime").html(detail[i].Logintime)
					$("#publish_"+(publish_id)+"_Logouttime").html(detail[i].Logouttime)
					$("#publish_"+(publish_id)+"_Logaction").html(detail[i].Logaction)
					}
				},error:function(){
					console.log('error')
				}
			});		
		};

		//取出总页数
		$.ajax({
			type:'POST',
			url:'/log/GetLoginPageCount/',
			dataType:'text',
			success:function(val){
				$('#mypublistcount').html(val)
				// console.log(val)
				GetLoginListInfo(s_page,page_size);

				//加载页码
				$('#pageToolbar').html("");
				$('#pageToolbar').Paging({pagesize:10,count:val,callback:function(page,size,count){
					//page:当前选择页码
					//size:当前每页显示数量
					//count：当前页码总数(含有多少个size)
					GetLoginListInfo(page,10)
					}
				});
			},error:function(){
				console.log('error')
			}
		});	

	};

	function GetActionList(s_page,page_size) {
		//取出单页数据
		function GetActionListInfo(s_page,page_size){
			$.ajax({
				type:'POST',
				url:'/log/GetActionList/',
				data:{'s_page':s_page,'page_size':page_size},
				dataType:'json',
				success:function(val){
					console.log(val)
					var detail = val.ActionQsetList
					// $("#previewlist").html("")
					// $('#previewlistcount').html(detail.length)
					if(detail.length==0){
						$("#previewlist").html('<tr><td colspan="9" style="text-align:center;">当前无记录</td></tr>')
					}else{
						$("#previewlist").html("")
					}
					for (var i=0;i < detail.length;i++){
						// $("#per_publish_user").html(val.review_data[i].publish_user)
						// console.log(val.review_data[i].publish_user)
						var review_id = detail[i]['id']
					
					$("#previewlist").append("<tr>\
							<td id='review_"+(review_id)+"_id'></td>\
							<td id='review_"+(review_id)+"_Actionuser'></td>\
							<td id='review_"+(review_id)+"_Actiontime'></td>\
							<td id='review_"+(review_id)+"_Actiontype'></td>\
							<td id='review_"+(review_id)+"_Actionmodule'></td>\
							<td id='review_"+(review_id)+"_Actioninfo'></td></tr>")

					//加载数据

					$("#review_"+(review_id)+"_id").html('<span class="badge">'+review_id+'</span>')
					$("#review_"+(review_id)+"_Actionuser").html(detail[i].Actionuser)
					$("#review_"+(review_id)+"_Actiontime").html(detail[i].Actiontime)
					$("#review_"+(review_id)+"_Actiontype").html(detail[i].Actiontype)
					$("#review_"+(review_id)+"_Actionmodule").html(detail[i].Actionmodule)
					$("#review_"+(review_id)+"_Actioninfo").html(detail[i].Actioninfo)
					
					}
					// $('#pageToolbar').html("");
					// $('#pageToolbar').Paging({pagesize:10,count:detail.length,callback:function(page,size,count){alert('1')}});

				},error:function(){
					console.log('error')
				}
			})			
		};

		//取出总页数
		$.ajax({
			type:'POST',
			url:'/log/GetActionPageCount/',
			dataType:'text',
			success:function(val){
				$("#previewlistcount").html(val);
				GetActionListInfo(s_page,page_size);
				//加载页码
				$('#pageToolbar').html("");
				$('#pageToolbar').Paging({pagesize:10,count:val,callback:function(page,size,count){
					//page:当前选择页码
					//size:当前每页显示数量
					//count：当前页码总数(含有多少个size)
					GetActionListInfo(page,10)
					}
				});
			},error:function(){
				console.log('error')
			}
		});		


	};





	
</script>

<!-- 	</body>
</html> -->